package edu.kaist.cs442.client.android.common.notification;

import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import edu.kaist.cs442.client.android.R;


/**
 * Created by IntelliJ IDEA.
 * User: duyleekun
 * Date: 2/25/12
 * Time: 10:54 PM
 * To change this template use File | Settings | File Templates.
 */
public class NotificationBar {

	public static void send(Context context, int id, CharSequence tickerText, CharSequence contentTitle, CharSequence contentText) {
		NotificationManager nm = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);

		Notification message = new Notification(R.drawable.ic_19x19, tickerText, System.currentTimeMillis());

		PendingIntent contentIntent = PendingIntent.getActivity(context, 0, new Intent(), 0);

		message.setLatestEventInfo(context, contentTitle, contentText, contentIntent);

		nm.notify(id, message);


	}
}
